package Practice;

import java.util.Scanner;

public class Title {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        int len = s.length();
        int num = 0;
        for (int i = 0; i < len; i++) {
            int z = s.charAt(i);
            if(z!=' '&&z!='\n')
                num++;
        }
        System.out.println(num);
    }

}
